package com.uniview.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.uniview.base.BaseDao;
import com.uniview.entity.po.ServiceOrderMedia;

@Repository("orderMediaDao")
public class ServiceOrdersMediaDao extends BaseDao<ServiceOrderMedia> {

	/**
	 * 根据工单ID查询关联的媒体
	 * @param orderId
	 * @return
	 * @throws Exception
	 */
	public List<ServiceOrderMedia> findMediasByOrderId(Integer orderId) throws Exception {
		String hql = "from ServiceOrderMedia where orderId = " + orderId;
		return this.findByHql(hql);
	}
}
